home *** CD-ROM | disk | FTP | other *** search
- function aspectCar(n)
- {
- if(etat == "cool")
- {
- car.gotoAndStop(n);
- }
- }
- function dehors()
- {
- if(etat == "cool")
- {
- etat = "carton";
- sons.gotoAndPlay("cartone");
- car.gotoAndPlay(12);
- }
- }
- function leJeu()
- {
- if(etat == "carton")
- {
- car._y += 30;
- }
- if(etat == "cool")
- {
- if(F1.hitTest(zone_score))
- {
- if(compteF1 == 1)
- {
- score += niveau;
- compteF1 = 0;
- }
- }
- if(F2.hitTest(zone_score))
- {
- if(compteF2 == 1)
- {
- score += niveau;
- compteF2 = 0;
- }
- }
- if(F3.hitTest(zone_score))
- {
- if(compteF3 == 1)
- {
- score += niveau;
- compteF3 = 0;
- }
- }
- if(F4.hitTest(zone_score))
- {
- if(compteF4 == 1)
- {
- score += niveau;
- compteF4 = 0;
- }
- }
- if(F5.hitTest(zone_score))
- {
- if(compteF5 == 1)
- {
- score += niveau;
- compteF5 = 0;
- }
- }
- if(F6.hitTest(zone_score))
- {
- if(compteF6 == 1)
- {
- score += niveau;
- compteF6 = 0;
- }
- }
- if(F7.hitTest(zone_score))
- {
- if(compteF7 == 1)
- {
- score += niveau;
- compteF7 = 0;
- }
- }
- if(F8.hitTest(zone_score))
- {
- if(compteF8 == 1)
- {
- score += niveau;
- compteF8 = 0;
- }
- }
- if(F9.hitTest(zone_score))
- {
- if(compteF9 == 1)
- {
- score += niveau;
- compteF9 = 0;
- }
- }
- if(F10.hitTest(zone_score))
- {
- if(compteF10 == 1)
- {
- score += niveau;
- compteF10 = 0;
- }
- }
- temps += 1;
- if(temps == 200)
- {
- niveau += 1;
- temps = 0;
- }
- }
- rap = 20;
- alea = random(100);
- n1 = v + F1._y / 60;
- if(470 + alea < F1._y and 400 - niveau * rap < F5._y and 400 - niveau * rap < F9._y)
- {
- F1._xscale = 20;
- F1._yscale = 20;
- F1.gotoAndStop(random(3) + 1);
- F1._x = 300;
- F1._y = 0;
- }
- if(470 + alea >= F1._y)
- {
- compteF1 = 1;
- F1._y += n1;
- F1._x -= n1 / 2.9;
- F1._xscale += n1 / 4;
- F1._yscale += n1 / 4;
- }
- n5 = v + F5._y / 60;
- if(470 + alea < F5._y and 350 - niveau * rap < F1._y and 350 - niveau * rap < F9._y)
- {
- F5._xscale = 20;
- F5._yscale = 20;
- F5.gotoAndStop(random(3) + 1);
- F5._x = 300;
- F5._y = 0;
- }
- if(470 + alea >= F5._y)
- {
- compteF5 = 1;
- F5._y += n5;
- F5._x -= n5 / 2.9;
- F5._xscale += n5 / 4;
- F5._yscale += n5 / 4;
- }
- n9 = v + F9._y / 60;
- if(470 + alea < F9._y and 400 - niveau * rap < F1._y and 400 - niveau * rap < F5._y)
- {
- F9._xscale = 20;
- F9._yscale = 20;
- F9.gotoAndStop(random(3) + 1);
- F9._x = 300;
- F9._y = 0;
- }
- if(470 + alea >= F9._y)
- {
- compteF9 = 1;
- F9._y += n9;
- F9._x -= n9 / 2.9;
- F9._xscale += n9 / 4;
- F9._yscale += n9 / 4;
- }
- n2 = v + F2._y / 45;
- if(470 + alea < F2._y and 350 - niveau * rap < F6._y and 350 - niveau * rap < F10._y)
- {
- F2._xscale = 20;
- F2._yscale = 20;
- F2.gotoAndStop(random(3) + 1);
- F2._x = 315;
- F2._y = 0;
- }
- if(470 + alea >= F2._y)
- {
- compteF2 = 1;
- F2._y += n2;
- F2._x -= n2 / 12;
- F2._xscale += n2 / 4;
- F2._yscale += n2 / 4;
- }
- n6 = v + F6._y / 45;
- if(470 + alea < F6._y and 400 - niveau * rap < F2._y and 400 - niveau * rap < F10._y)
- {
- F6._xscale = 20;
- F6._yscale = 20;
- F6.gotoAndStop(random(3) + 1);
- F6._x = 315;
- F6._y = 0;
- }
- if(470 + alea >= F6._y)
- {
- compteF6 = 1;
- F6._y += n6;
- F6._x -= n6 / 12;
- F6._xscale += n6 / 4;
- F6._yscale += n6 / 4;
- }
- n10 = v + F10._y / 45;
- if(470 + alea < F10._y and 400 - niveau * rap < F2._y and 400 - niveau * rap < F6._y)
- {
- F10._xscale = 20;
- F10._yscale = 20;
- F10.gotoAndStop(random(3) + 1);
- F10._x = 315;
- F10._y = 0;
- }
- if(470 + alea >= F10._y)
- {
- compteF10 = 1;
- F10._y += n10;
- F10._x -= n10 / 12;
- F10._xscale += n10 / 4;
- F10._yscale += n10 / 4;
- }
- n3 = v + F3._y / 30;
- if(470 + alea < F3._y and 400 - niveau * rap < F7._y)
- {
- F3._xscale = 20;
- F3._yscale = 20;
- F3.gotoAndStop(random(3) + 1);
- F3._x = 328;
- F3._y = 0;
- }
- if(470 + alea >= F3._y)
- {
- compteF3 = 1;
- F3._y += n3;
- F3._x += n3 / 7;
- F3._xscale += n3 / 4;
- F3._yscale += n3 / 4;
- }
- n7 = v + F7._y / 30;
- if(470 + alea < F7._y and 400 - niveau * rap < F3._y)
- {
- F7._xscale = 20;
- F7._yscale = 20;
- F7.gotoAndStop(random(3) + 1);
- F7._x = 328;
- F7._y = 0;
- }
- if(470 + alea >= F7._y)
- {
- compteF7 = 1;
- F7._y += n7;
- F7._x += n7 / 7;
- F7._xscale += n7 / 4;
- F7._yscale += n7 / 4;
- }
- n4 = v + F4._y / 20;
- if(470 + alea < F4._y and 400 - niveau * rap < F8._y)
- {
- F4._xscale = 20;
- F4._yscale = 20;
- F4.gotoAndStop(random(3) + 1);
- F4._x = 342;
- F4._y = 0;
- }
- if(470 + alea >= F4._y)
- {
- compteF4 = 1;
- F4._y += n4;
- F4._x += n4 / 2.5;
- F4._xscale += n4 / 4;
- F4._yscale += n4 / 4;
- }
- n8 = v + F8._y / 20;
- if(470 + alea < F8._y and 400 - niveau * rap < F4._y)
- {
- F8._xscale = 20;
- F8._yscale = 20;
- F8.gotoAndStop(random(3) + 1);
- F8._x = 342;
- F8._y = 0;
- }
- if(470 + alea >= F8._y)
- {
- compteF8 = 1;
- F8._y += n8;
- F8._x += n8 / 2.5;
- F8._xscale += n8 / 4;
- F8._yscale += n8 / 4;
- }
- }
- function fabrique_message(cette_email)
- {
- mon_message = "";
- ma_longueur = cette_email.length;
- ma_longueur_string = String(ma_longueur);
- if(ma_longueur_string.length == 1)
- {
- ma_longueur_string = "0" + ma_longueur_string;
- }
- mon_message += ma_longueur_string;
- mon_message += cette_email;
- while(mon_message.length < 66)
- {
- mon_message += "k";
- }
- i = 0;
- var_xor = 0;
- while(i < 66)
- {
- j = ord(mon_message.charAt(i));
- var_xor ^= j;
- i++;
- }
- fin_xor = String(var_xor);
- if(fin_xor.length == 1)
- {
- fin_xor = "00" + fin_xor;
- }
- if(fin_xor.length == 2)
- {
- fin_xor = "0" + fin_xor;
- }
- mon_message += fin_xor;
- return mon_message;
- }
- function envoi_message(la_email)
- {
- le_message_a_crypter = fabrique_message(la_email);
- le_message_a_envoyer = crypte_message(le_message_a_crypter);
- l_string_message = "php/update_scores.php?args=" + le_message_a_envoyer;
- getURL(l_string_message,"_self","POST");
- l_string_message = "php/lire_scores.php?args=1&idgame=230 &TimeStamp=" + String(l_temps.getDay() + l_temps.getHours() + l_temps.getMinutes() + l_temps.getSeconds());
- loadVariables(l_string_message,_root.tableau_scores);
- }
- function ascii_philippe(le_char)
- {
- le_code_ascii = ord(le_char);
- if(le_code_ascii >= 48 && 57 >= le_code_ascii)
- {
- le_code_ascii -= 48;
- }
- else if(le_code_ascii >= 65 && 90 >= le_code_ascii)
- {
- le_code_ascii -= 55;
- }
- else if(le_code_ascii >= 97 && 122 >= le_code_ascii)
- {
- le_code_ascii -= 61;
- }
- else
- {
- if(le_char == "_")
- {
- le_code_ascii = 62;
- }
- if(le_char == "@")
- {
- le_code_ascii = 63;
- }
- if(le_char == ".")
- {
- le_code_ascii = 64;
- }
- if(le_char == "-")
- {
- le_code_ascii = 65;
- }
- if(le_char == "~")
- {
- le_code_ascii = 66;
- }
- }
- return le_code_ascii;
- }
- function char_philippe(le_code_ascii)
- {
- if(le_code_ascii < 10)
- {
- le_code_ascii += 48;
- le_char = chr(le_code_ascii);
- }
- else if(le_code_ascii < 36)
- {
- le_code_ascii += 55;
- le_char = chr(le_code_ascii);
- }
- else if(le_code_ascii < 62)
- {
- le_code_ascii += 61;
- le_char = chr(le_code_ascii);
- }
- else if(le_code_ascii == 62)
- {
- le_char = "_";
- }
- else if(le_code_ascii == 63)
- {
- le_char = "@";
- }
- else if(le_code_ascii == 64)
- {
- le_char = ".";
- }
- else if(le_code_ascii == 65)
- {
- le_char = "-";
- }
- else if(le_code_ascii == 66)
- {
- le_char = "~";
- }
- return le_char;
- }
- function crypte_message(m_a_c)
- {
- message_a_retourner = "";
- code_precedent = 36;
- ii = 68;
- while(ii >= 0)
- {
- mon_char = m_a_c.charAt(ii);
- nouveau_code = ascii_philippe(mon_char) + code_precedent;
- if(66 < nouveau_code)
- {
- nouveau_code -= 67;
- }
- code_precedent = nouveau_code;
- message_a_retourner = char_philippe(nouveau_code) + message_a_retourner;
- ii--;
- }
- return message_a_retourner;
- }
- v = 0.8;
- temps = 0;
- niveau = 1;
- etat = "cool";
- score = 0;
-